package com.hc.mailDbService;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class MailDataBaseHelper extends SQLiteOpenHelper{
	 private static final String DB_NAME = "mailData.db"; //数据库名称
	    private static final int version = 1; //数据库版本
	public MailDataBaseHelper(Context context) {
		super(context, DB_NAME, null, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {

		  String sql = "create table mailData(sendAddress varchar(60) not null ,smtpAddress varchar(20) not null," +
		  		"userName varchar(60) not null,pwd varchar(60) not null);";   
	       db.execSQL(sql);
		Log.e("sql", "创建mail记录表");
	
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {

		  db.execSQL("ALTER TABLE mailData ADD COLUMN other STRING");  
		
	
	}

}
